# import numpy as np
#
# x=np.array([[1,2,3],[4,5,6]],np.int32)
# # print(type(x))
# # print(x.shape)
# # print(x.dtype)
#
# print(x[1,2])
# y=x[:,1]
# print(y)
# y[0]=9
# print(y)
# print(x)
# i=set()
# i.add('')
# i.add('')
# print(i)
# if i :
#     print(len(i))
# else:
#     print('f')
import os
from functools import reduce

a = ['12346', '1256', '12368']
b = []
d = []
c = []
e = []
x=''
for i in a:
    b.append(list(i))
for i in b:
    d.append(len(i))
for i in range(min(d)):
    c = list(map(lambda x: x[i], b))
    s = list(set(c))
    if len(set(c)) == 1:
        e += s
    else:
        break
for i in e:
    x+=i
print(x)
